import {createRouter, createWebHistory} from 'vue-router'

export const routes = [
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/base/LoginView.vue')
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('@/views/base/IndexView.vue')
    },
     {
        path: "/:pathMatch(.*)*", // 解决路由爆[Vue Router warn]: No match found for location with path
        meta: {
            title: "找不到此页面",
        },
        component: () => import("@/views/exception/404.vue"), // 切记不要使用 redirect: '/403',
    }
]
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: routes
})

export default router
